\(\int (a+b \log (c x^n))^3 \, dx\) [60]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 66 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=6 a b^2 n^2 x-6 b^3 n^3 x+6 b^3 n^2 x \log \left (c x^n\right )-3 b n x \left (a+b \log \left (c x^n\right )\right )^2+x \left (a+b \log \left (c x^n\right )\right )^3 \]

[Out]

6*a*b^2*n^2*x-6*b^3*n^3*x+6*b^3*n^2*x*ln(c*x^n)-3*b*n*x*(a+b*ln(c*x^n))^2+x*(a+b*ln(c*x^n))^3

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2333, 2332} \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=6 a b^2 n^2 x-3 b n x \left (a+b \log \left (c x^n\right )\right )^2+x \left (a+b \log \left (c x^n\right )\right )^3+6 b^3 n^2 x \log \left (c x^n\right )-6 b^3 n^3 x \]

[In]

Int[(a + b*Log[c*x^n])^3,x]

[Out]

6*a*b^2*n^2*x - 6*b^3*n^3*x + 6*b^3*n^2*x*Log[c*x^n] - 3*b*n*x*(a + b*Log[c*x^n])^2 + x*(a + b*Log[c*x^n])^3

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rubi steps \begin{align*} \text {integral}& = x \left (a+b \log \left (c x^n\right )\right )^3-(3 b n) \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx \\ & = -3 b n x \left (a+b \log \left (c x^n\right )\right )^2+x \left (a+b \log \left (c x^n\right )\right )^3+\left (6 b^2 n^2\right ) \int \left (a+b \log \left (c x^n\right )\right ) \, dx \\ & = 6 a b^2 n^2 x-3 b n x \left (a+b \log \left (c x^n\right )\right )^2+x \left (a+b \log \left (c x^n\right )\right )^3+\left (6 b^3 n^2\right ) \int \log \left (c x^n\right ) \, dx \\ & = 6 a b^2 n^2 x-6 b^3 n^3 x+6 b^3 n^2 x \log \left (c x^n\right )-3 b n x \left (a+b \log \left (c x^n\right )\right )^2+x \left (a+b \log \left (c x^n\right )\right )^3 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.76 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=x \left (\left (a+b \log \left (c x^n\right )\right )^3-3 b n \left (\left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a-b n+b \log \left (c x^n\right )\right )\right )\right ) \]

[In]

Integrate[(a + b*Log[c*x^n])^3,x]

[Out]

x*((a + b*Log[c*x^n])^3 - 3*b*n*((a + b*Log[c*x^n])^2 - 2*b*n*(a - b*n + b*Log[c*x^n])))

Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.80

method result size
parallelrisch \(x \,b^{3} \ln \left (c \,x^{n}\right )^{3}-3 x \ln \left (c \,x^{n}\right )^{2} b^{3} n +6 b^{3} n^{2} x \ln \left (c \,x^{n}\right )-6 b^{3} n^{3} x +3 x a \,b^{2} \ln \left (c \,x^{n}\right )^{2}-6 x \ln \left (c \,x^{n}\right ) a \,b^{2} n +6 a \,b^{2} n^{2} x +3 x \,a^{2} b \ln \left (c \,x^{n}\right )-3 a^{2} b n x +a^{3} x\) \(119\)
risch \(\text {Expression too large to display}\) \(2641\)

[In]

int((a+b*ln(c*x^n))^3,x,method=_RETURNVERBOSE)

[Out]

x*b^3*ln(c*x^n)^3-3*x*ln(c*x^n)^2*b^3*n+6*b^3*n^2*x*ln(c*x^n)-6*b^3*n^3*x+3*x*a*b^2*ln(c*x^n)^2-6*x*ln(c*x^n)*
a*b^2*n+6*a*b^2*n^2*x+3*x*a^2*b*ln(c*x^n)-3*a^2*b*n*x+a^3*x

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 198 vs. \(2 (66) = 132\).

Time = 0.30 (sec) , antiderivative size = 198, normalized size of antiderivative = 3.00 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=b^{3} n^{3} x \log \left (x\right )^{3} + b^{3} x \log \left (c\right )^{3} - 3 \, {\left (b^{3} n - a b^{2}\right )} x \log \left (c\right )^{2} + 3 \, {\left (2 \, b^{3} n^{2} - 2 \, a b^{2} n + a^{2} b\right )} x \log \left (c\right ) + 3 \, {\left (b^{3} n^{2} x \log \left (c\right ) - {\left (b^{3} n^{3} - a b^{2} n^{2}\right )} x\right )} \log \left (x\right )^{2} - {\left (6 \, b^{3} n^{3} - 6 \, a b^{2} n^{2} + 3 \, a^{2} b n - a^{3}\right )} x + 3 \, {\left (b^{3} n x \log \left (c\right )^{2} - 2 \, {\left (b^{3} n^{2} - a b^{2} n\right )} x \log \left (c\right ) + {\left (2 \, b^{3} n^{3} - 2 \, a b^{2} n^{2} + a^{2} b n\right )} x\right )} \log \left (x\right ) \]

[In]

integrate((a+b*log(c*x^n))^3,x, algorithm="fricas")

[Out]

b^3*n^3*x*log(x)^3 + b^3*x*log(c)^3 - 3*(b^3*n - a*b^2)*x*log(c)^2 + 3*(2*b^3*n^2 - 2*a*b^2*n + a^2*b)*x*log(c
) + 3*(b^3*n^2*x*log(c) - (b^3*n^3 - a*b^2*n^2)*x)*log(x)^2 - (6*b^3*n^3 - 6*a*b^2*n^2 + 3*a^2*b*n - a^3)*x +
3*(b^3*n*x*log(c)^2 - 2*(b^3*n^2 - a*b^2*n)*x*log(c) + (2*b^3*n^3 - 2*a*b^2*n^2 + a^2*b*n)*x)*log(x)

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 133, normalized size of antiderivative = 2.02 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=a^{3} x - 3 a^{2} b n x + 3 a^{2} b x \log {\left (c x^{n} \right )} + 6 a b^{2} n^{2} x - 6 a b^{2} n x \log {\left (c x^{n} \right )} + 3 a b^{2} x \log {\left (c x^{n} \right )}^{2} - 6 b^{3} n^{3} x + 6 b^{3} n^{2} x \log {\left (c x^{n} \right )} - 3 b^{3} n x \log {\left (c x^{n} \right )}^{2} + b^{3} x \log {\left (c x^{n} \right )}^{3} \]

[In]

integrate((a+b*ln(c*x**n))**3,x)

[Out]

a**3*x - 3*a**2*b*n*x + 3*a**2*b*x*log(c*x**n) + 6*a*b**2*n**2*x - 6*a*b**2*n*x*log(c*x**n) + 3*a*b**2*x*log(c
*x**n)**2 - 6*b**3*n**3*x + 6*b**3*n**2*x*log(c*x**n) - 3*b**3*n*x*log(c*x**n)**2 + b**3*x*log(c*x**n)**3

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.71 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=b^{3} x \log \left (c x^{n}\right )^{3} + 3 \, a b^{2} x \log \left (c x^{n}\right )^{2} - 3 \, a^{2} b n x + 3 \, a^{2} b x \log \left (c x^{n}\right ) + 6 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} a b^{2} - 3 \, {\left (n x \log \left (c x^{n}\right )^{2} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} n\right )} b^{3} + a^{3} x \]

[In]

integrate((a+b*log(c*x^n))^3,x, algorithm="maxima")

[Out]

b^3*x*log(c*x^n)^3 + 3*a*b^2*x*log(c*x^n)^2 - 3*a^2*b*n*x + 3*a^2*b*x*log(c*x^n) + 6*(n^2*x - n*x*log(c*x^n))*
a*b^2 - 3*(n*x*log(c*x^n)^2 + 2*(n^2*x - n*x*log(c*x^n))*n)*b^3 + a^3*x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 219 vs. \(2 (66) = 132\).

Time = 0.33 (sec) , antiderivative size = 219, normalized size of antiderivative = 3.32 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=b^{3} n^{3} x \log \left (x\right )^{3} - 3 \, b^{3} n^{3} x \log \left (x\right )^{2} + 3 \, b^{3} n^{2} x \log \left (c\right ) \log \left (x\right )^{2} + 6 \, b^{3} n^{3} x \log \left (x\right ) - 6 \, b^{3} n^{2} x \log \left (c\right ) \log \left (x\right ) + 3 \, b^{3} n x \log \left (c\right )^{2} \log \left (x\right ) + 3 \, a b^{2} n^{2} x \log \left (x\right )^{2} - 6 \, b^{3} n^{3} x + 6 \, b^{3} n^{2} x \log \left (c\right ) - 3 \, b^{3} n x \log \left (c\right )^{2} + b^{3} x \log \left (c\right )^{3} - 6 \, a b^{2} n^{2} x \log \left (x\right ) + 6 \, a b^{2} n x \log \left (c\right ) \log \left (x\right ) + 6 \, a b^{2} n^{2} x - 6 \, a b^{2} n x \log \left (c\right ) + 3 \, a b^{2} x \log \left (c\right )^{2} + 3 \, a^{2} b n x \log \left (x\right ) - 3 \, a^{2} b n x + 3 \, a^{2} b x \log \left (c\right ) + a^{3} x \]

[In]

integrate((a+b*log(c*x^n))^3,x, algorithm="giac")

[Out]

b^3*n^3*x*log(x)^3 - 3*b^3*n^3*x*log(x)^2 + 3*b^3*n^2*x*log(c)*log(x)^2 + 6*b^3*n^3*x*log(x) - 6*b^3*n^2*x*log
(c)*log(x) + 3*b^3*n*x*log(c)^2*log(x) + 3*a*b^2*n^2*x*log(x)^2 - 6*b^3*n^3*x + 6*b^3*n^2*x*log(c) - 3*b^3*n*x
*log(c)^2 + b^3*x*log(c)^3 - 6*a*b^2*n^2*x*log(x) + 6*a*b^2*n*x*log(c)*log(x) + 6*a*b^2*n^2*x - 6*a*b^2*n*x*lo
g(c) + 3*a*b^2*x*log(c)^2 + 3*a^2*b*n*x*log(x) - 3*a^2*b*n*x + 3*a^2*b*x*log(c) + a^3*x

Mupad [B] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.42 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \, dx=x\,\left (a^3-3\,a^2\,b\,n+6\,a\,b^2\,n^2-6\,b^3\,n^3\right )+x\,\ln \left (c\,x^n\right )\,\left (3\,a^2\,b-6\,a\,b^2\,n+6\,b^3\,n^2\right )+b^3\,x\,{\ln \left (c\,x^n\right )}^3+3\,b^2\,x\,{\ln \left (c\,x^n\right )}^2\,\left (a-b\,n\right ) \]

[In]

int((a + b*log(c*x^n))^3,x)

[Out]

x*(a^3 - 6*b^3*n^3 + 6*a*b^2*n^2 - 3*a^2*b*n) + x*log(c*x^n)*(3*a^2*b + 6*b^3*n^2 - 6*a*b^2*n) + b^3*x*log(c*x
^n)^3 + 3*b^2*x*log(c*x^n)^2*(a - b*n)